# page/page_main.py
from base.base import Base
from loc.main_page_locators import MainPageLocators
from page.page_financial_tools import PageFinancialTools
from page.page_personal_center import PagePersonalCenter
from page.page_personal_finance import PagePersonalFinance

class PageMain(Base):
    def go_to_financial_tools(self):
        """进入金融工具页面"""
        self.click(MainPageLocators.MENU_FINANCIAL_TOOLS)
        return PageFinancialTools(self.driver)

    def go_to_personal_finance(self):
        """进入个人理财页面"""
        self.click(MainPageLocators.MENU_PERSONAL_FINANCE)
        return PagePersonalFinance(self.driver)

    def go_to_personal_center(self):
        """进入个人中心页面"""
        self.click(MainPageLocators.MENU_PERSONAL_CENTER)
        return PagePersonalCenter(self.driver)